/* 通用切换按钮点击方法 */
function common_exchange_onclick(){
	var sysCode = sysTable.getFieldValue("SYS_ID");
	var sysName = sysTable.getFieldValue("SYS_NAM");
	window.returnValue = sysCode;	
	window.close();	
}

/* 通用按钮点击前方法  common_exchange_before_onclick */
function common_page_onclick(relaPath){
	
	var sendSet = new Yacon.data.DataSet();
	var arg = new Object();
	var dialogArg = "dialogwidth:1200px; Dialogheight:600px;center:yes;help:no;resizable:no;scroll:no;status:no";
	var sysCode = window.showModalDialog(Yacon.getRootPath()+"/UI/xwpw/home/sysInfoList.jsp", arg, dialogArg);
	
	if(relaPath){
		window.location = Yacon.getFullPath(relaPath, sysCode);	
	}else{
		window.location = Yacon.getFullPath(Yacon.getRelaPath(), sysCode);	
	}
	
}

/* 隐藏按钮 */
function hideElement(elementID){
	document.getElementById(elementID).parentNode.style.display="none";
	document.getElementById(elementID+"_label").parentNode.style.display="none";
}

/* Edit页面切换 */
function reloadEdit(href){
	window.reload.href = href;
	window.reload.click();
}

function verifyIdentiyNo(icCard){
	var reg=/^[1-9]{1}[0-9]{14}$|^[1-9]{1}[0-9]{16}([0-9]|[xX])$/;
	if(reg.test(icCard)){
		return true
	}else{
		return false
	}
}